#ifndef PORTSIP_ICALLBACKPARAMETERS_hxx
#define PORTSIP_ICALLBACKPARAMETERS_hxx


namespace PortSIP
{

#ifndef ET_BUFFER_SIZE
#define ET_BUFFER_SIZE		512
#endif

#ifndef MAX_MATCHED_AUDIO_CODEC_COUNT
#define  MAX_MATCHED_AUDIO_CODEC_COUNT 15
#endif

#ifndef MAX_MATCHED_VIDEO_CODEC_COUNT
#define  MAX_MATCHED_VIDEO_CODEC_COUNT 5
#endif



#ifndef SIP_MESSAGE_MAXSIZE
#define SIP_MESSAGE_MAXSIZE	1024*4
#endif


typedef enum
{
	SIP_UNKNOWN = 0,
    SIP_REGISTER_SUCCESS = 1,		//1 Register to SIP server succeeded
    SIP_REGISTER_FAILURE,			//2 Register to SIP server failed

    SIP_INVITE_INCOMING,			//3	The call is incoming
    SIP_INVITE_TRYING,				//4	The call is trying
    SIP_INVITE_SESSION_PROGRESS,	//5	The 183 MESSAGE, early media
    SIP_INVITE_RINGING,				//6	The call is ringing
    SIP_INVITE_ANSWERED,			//7	The callee has answered this call
    SIP_INVITE_FAILURE,				//8	The call is failed
    SIP_INVITE_UPDATED,				//9	The remote party updated this call
    SIP_INVITE_CONNECTED,			//10	The call(dialog) is connected - usually for received or sent the ACK
    SIP_INVITE_BEGINING_FORWARD,	//11  When the SDK begin forwarding the call
    SIP_INVITE_CLOSED,				//12	The call is closed

    SIP_REMOTE_HOLD,				//13	The remote party has hold this call
    SIP_REMOTE_UNHOLD,				//14	The remote party has take off the hold

    SIP_RECEIVED_REFER,				//15	Received a REFER message
    SIP_REFER_ACCEPTED,				//16	The REFER request was accepted
    SIP_REFER_REJECTED,				//17	The REFER request was rejected
    SIP_TRANSFER_TRYING,			//18	The call transfer is trying
    SIP_TRANSFER_RINGING,			//19	The transfer call is ringing
    SIP_ACTV_TRANSFER_SUCCESS,		//20	The active transfer call succeeds
    SIP_ACTV_TRANSFER_FAILURE,		//21	Active transfer call is failure

    SIP_RECEIVED_SIGNALING,			//22	This event will be fired when the SDK received every SIP message
    SIP_SENDING_SIGNALING,			//23	This event will be fired when the SDK send every SIP message

    SIP_WAITING_VOICEMESSAGE,		//24	If have waiting voice message, this event will be fired(MWI)
    SIP_WAITING_FAXMESSAGE,			//25	If have waiting fax message, this event will be fired(MWI)

    SIP_RECV_DTMFTONE,				//26	This event will be fired when received a DTMF tone

    SIP_RECV_MESSAGE,				//27	Received a MESSAGE message in dialog
    SIP_RECV_OUTOFDIALOG_MESSAGE,	//28	Received a MESSAGE out of dialog

    SIP_SEND_MESSAGE_SUCCESS,		//29	Succeeded to send the message
    SIP_SEND_MESSAGE_FAILURE,		//30	Failed to send the message

    SIP_SEND_OUTOFDIALOG_MESSAGE_SUCCESS,	//31	Succeeded to send the out of dialog message
    SIP_SEND_OUTOFDIALOG_MESSAGE_FAILURE,	//32	Failed to send the out of dialog message

    SIP_PRESENCE_RECV_SUBSCRIBE,	//33	The remote side request subscribe presence state
    SIP_PRESENCE_ONLINE,			//34	The contact is go online
    SIP_PRESENCE_OFFLINE,			//35	The contact is go offline

    SIP_RECV_OPTIONS,				//36	Received an OPTIONS message out of dialog
    SIP_RECV_INFO,					//37	Received a INFO message in dialog

    SIP_PLAY_AUDIO_FILE_FINISHED,   //38
    SIP_PLAY_VIDEO_FILE_FINISHED,   //39

}SIP_EVENT;


class ICallbackParameters
{

public:
	virtual SIP_EVENT getEventType() = 0;

	virtual long getSessionId() = 0;

	virtual bool getCallerDisplayName(char * displayName, int length) = 0;
	virtual bool getCalleeDisplayName(char * displayName, int length) = 0;


	virtual bool getCaller(char * caller, int length) = 0;
	virtual bool getCallee(char * callee, int length) = 0;

	virtual bool getExistsEarlyMedia() = 0;

	virtual int getStatusCode() = 0;
	virtual bool getStatusText(char * text, int length) = 0;

	virtual long getReferId() = 0;
	virtual bool getReferFrom(char * referFrom, int length) = 0;
	
	virtual bool getReferTo(char * referTo, int length) = 0;

	virtual bool getForwardTo(char * forwardTo, int length) = 0;

	virtual bool getMessageData(unsigned char * messageData, int * length) = 0;

	virtual bool getSignaling(char * signaling, int length) = 0;

	virtual bool getAudioCodecs(char * codecs, int len) = 0;
	virtual bool getVideoCodecs(char * codecs, int len) = 0;

	virtual bool getExistsVideo() = 0;
	virtual bool getExistsAudio() = 0;

	virtual bool getWaitingMessageAccount(char * account, int length) = 0;

	virtual bool getPresenceSubject(char * subject, int length) = 0;

	virtual int getUrgentNewWaitingMessageCount() = 0;

	virtual int getNewWaitingMessageCount() = 0;

	virtual int getUrgentOldWaitingMessageCount() = 0;

	virtual int getOldWaitingMessageCount() = 0;

	virtual int getDTMFTone() = 0;

	virtual long getSubscribeId() = 0;
	virtual int getPlayedAudioFileName(char * fileName, int length) = 0;

	virtual bool getMimeType(char * mimeType, int length) = 0;
	virtual bool getSubMimeType(char * mimeType, int length) = 0;
	virtual long getMessageId() = 0;
};

}
#endif//PORTSIP_ICALLBACKPARAMETERS_hxx
